package hpu.bitenergy.List;

import hpu.bitenergy.util.MongoDBHerlper;
import hpu.bitenergy.util.StringHelper;

import java.util.List;

import com.mongodb.BasicDBObject;
import com.mongodb.DBCollection;
import com.mongodb.DBObject;

/**
 * 情报list
 * @author Administrator
 *
 */
public class LiteratureList extends GetList{

	@Override
	public List<DBObject> getQueryList(BasicDBObject query) {
		MongoDBHerlper mo=new MongoDBHerlper();
	DBCollection col=mo.GetDB(StringHelper.DBNAME, StringHelper.LIERATURECOL);
	List<DBObject>list=	col.find(query).toArray();
		// TODO Auto-generated method stub
		return list;
	}
	//通过名字查合作者
	@Override
	public List<DBObject> getQueryList(BasicDBObject query, BasicDBObject query2) {
		// TODO Auto-generated method stub
		MongoDBHerlper mo=new MongoDBHerlper();
		DBCollection col=mo.GetDB(StringHelper.DBNAME, StringHelper.LIERATURECOL);
		List<DBObject>list=	col.find(query,query2).toArray();
			// TODO Auto-generated method stub
			return list;
		
	}
}
